interface FormatOptions {
  date?: Date
  dateSeparator?: string
  timeSeparator?: string
  includeTime?: boolean
}

export function formatDateTime (options: FormatOptions = {}) {
  const {
    date = new Date(),
    dateSeparator = '-',
    timeSeparator = ':',
    includeTime = true,
  } = options;
  
  const year = date.getFullYear();
  const month = String(date.getMonth() + 1).padStart(2, '0');
  const day = String(date.getDate()).padStart(2, '0');
  
  let result = `${year}${dateSeparator}${month}${dateSeparator}${day}`;
  
  if (includeTime) {
    const hours = String(date.getHours()).padStart(2, '0');
    const minutes = String(date.getMinutes()).padStart(2, '0');
    const seconds = String(date.getSeconds()).padStart(2, '0');
    
    result += ` ${hours}${timeSeparator}${minutes}${timeSeparator}${seconds}`;
  }
  
  return result;
}
